#ifndef IMAGELABEL_H
#define IMAGELABEL_H

#include <QWidget>
#include <QLabel>
#include <QMouseEvent>

class ImageLabel : public QLabel
{
	Q_OBJECT

public:
	ImageLabel();
	~ImageLabel();
signals:
void doubleClicked(); ///< double click with LMB
void clicked(); ///< single click with LMB
void pressed(); ///< LMB pressed
void released(); ///< LMB released
void mouseOver(); ///< mouse pointer just entered the widget
void mouseOut(); ///< mouse pointer just left the widget
void dragFinished(int dx, int dy);
void wheelMoved(int delta);
protected:
void mouseDoubleClickEvent ( QMouseEvent * e );
void mousePressEvent( QMouseEvent *e);
void mouseReleaseEvent( QMouseEvent *e);
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void mouseMoveEvent(QMouseEvent* e);
void wheelEvent(QWheelEvent* e);
bool hitLabel(const QPoint &p);
bool m_pressed; 
int m_startX;
int m_startY;

};

#endif // IMAGELABEL_H
